package service;

import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpSession;
import po.User;
import utils.ServerResponse;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/26 14:09
 * @description:
 */
public interface UserService<T> {

  ServerResponse<User> login(String username, String password);

  ServerResponse<User> findAll();


  ServerResponse insert(User user) throws Exception;

  ServerResponse<User> check(String username, String password);

  ServerResponse<User> findByUsername(String username);


  ServerResponse removeSession(HttpSession session);


  ServerResponse get_information(HttpSession session);

  ServerResponse reset_password(String passwordOld, String passwordNew,HttpSession session);

  ServerResponse update_information(String username, String email, String phone, String question, String answer, HttpSession session);

  ServerResponse forget_check_answer(String username, String question, String answer);

  ServerResponse forget_reset_password(String username, String passwordNew, String forgetToken,HttpSession session);
}
